﻿package mortal.game.scene3D.map3D.mapShader
{
    import frEngine.shader.*;
    import frEngine.shader.filters.*;
    import frEngine.shader.filters.vertexFilters.*;
    import frEngine.shader.filters.vertexFilters.def.*;

    public class MapVertexFilter extends VertexFilter
    {

        public function MapVertexFilter()
        {
            super(FilterType.Transform);
            return;
        }// end function

        override public function setRegisterParams(param1:Program3dRegisterInstance) : void
        {
            return;
        }// end function

        override public function get programeId() : String
        {
            return "MapVertexFilter0";
        }// end function

        override public function createVertexCode(param1:Program3dRegisterInstance, param2:int) : String
        {
            var _loc_3:Array = [new ToBuilderInfo("va1", FilterName.POSITION, false, 3)];
            _loc_3.push(new ToBuilderInfo("vm0", "{transform}", false, 1, null));
            var _loc_4:String = "";
            _loc_4 = _loc_4 + "mov           {output}    \t\t\tva1           \t\t \t\n";
            _loc_4 = _loc_4 + "mov           {output}.w    \t\t{vcConst1}.z       \t\n";
            _loc_4 = _loc_4 + "m44           {output}    \t\t\t{output}    \tvm0   \t\n";
            _loc_4 = param1.toBuild(_loc_4, _loc_3);
            param1.OpType = ECalculateOpType.ViewProj;
            return _loc_4;
        }// end function

    }
}
